﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BlueCrest.ConfigManagement.Core.Data;

namespace BlueCrest.ConfigManagement.Storage
{
    /// <summary>
    /// Defines interface which is used for retrieving config items from some data store
    /// </summary>
    public interface IConfigStorageService
    {
        /// <summary>
        /// Get the list of available scopes
        /// </summary>
        /// <returns></returns>
        List<ScopeEntity> GetScopes();

        /// <summary>
        /// Gets all config paths that we hold in data store
        /// </summary>
        /// <returns></returns>
        List<ConfigPathTreeEntity> GetAllConfigPath();

        /// <summary>
        /// Get Config Paths starting from the given PathId all the way down
        /// </summary>
        /// <param name="pathId"></param>
        /// <param name="treeDepth">If not provided (i.e. left at -1), will loop through tree hierarchy</param>
        /// <returns></returns>
        List<ConfigPathTreeEntity> GetConfigPathStartingFrom(int pathId, int treeDepth = -1);

        /// <summary>
        /// Gets the Entries for the given ConfigPathId
        /// </summary>
        /// <param name="pathId"></param>
        /// <returns></returns>
        List<ConfigPathEntryEntity> GetEntries(int pathId);

    }
}
